home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / c_wndw.zip / CURSOR1.C < prev    next >
Text File  |  1989-05-25  |  817b  |  28 lines

  1. /*  (c) Marietta Systems, Inc. 1987
  2. *   All rights reserved
  3. *
  4. *   Demonstration program of function set-crsr
  5. */
  6. #include "mtest.h"
  7. void main() {
  8. int x;
  9. char text[4];
  10. clr_scrn("Set_crsr test");
  11. if (1 > mk_wndw(5, 10, 16, 41, "A 10 X 30 window")) goodbye(501);
  12. display("123456789012345678901234567890", 1, 1, reverse);
  13. for (x = 2 ; x <= 10 ; sprintf(text, "%u", x), 
  14.      display(text, x++, 1, high));
  15. /*        */
  16. jump: disp_msg("Cursor to (4,10), press a key",1); read_kb(); 
  17. set_crsr(-5, -20); 
  18. disp_msg("Cursor to (6,15), press a key",1); read_kb(); 
  19. set_crsr(6, 15);
  20. disp_msg("Cursor to (1,1), press a key",1); read_kb(); 
  21. set_crsr(1, 1);
  22. disp_msg("Cursor to (10,30), press a key",1); read_kb(); 
  23. set_crsr(10, 30);
  24. idleloop(30);
  25. if (disp_qry(" Around again")) goto jump; 
  26. goodbye(0);
  27. }
  28.